DevForce Help Reference
GroupBy<TSource>(IEntityQuery<TSource>,IProjectionSelector) Method
Example 


Groups the elements of a sequence according to a specified key selector function.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function GroupBy(Of TSource)( _
   ByVal source As IEntityQuery(Of TSource), _
   ByVal keySelector As IProjectionSelector _
) As ITypedEntityQuery
'Usage
 
Dim source As IEntityQuery(Of TSource)
Dim keySelector As IProjectionSelector
Dim value As ITypedEntityQuery
 
value = EntityQueryExtensions.GroupBy(Of TSource)(source, keySelector)

Parameters

source
keySelector

Type Parameters

TSource
Example
var mgr = new DomainModelEntityManager();
var entityType = typeof(Customer);
var rootQuery = EntityQuery.Create(entityType);
var ps = new ProjectionSelector("Country");

var query = rootQuery.GroupBy(ps);
var results = query.Execute();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityQueryExtensions Class
EntityQueryExtensions Members
Overload List

Send Feedback